package com.powernode.springmvc.controller;

import com.powernode.springmvc.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//@Controller
@RestController
public class HelloController {
    @GetMapping("/hello")
//    @ResponseBody
    public String hello() {
        return "hello";
    }

    @GetMapping("/getUser")
//    @ResponseBody
    public User getUser() {
        User user = new User("张三", "aaaa1111", 19);
        return user;
    }
}
